<?php


namespace app\api\controller\v1;


use app\adminapi\controller\AuthController;
use app\services\exam\ExamStatusService;
use think\facade\App;

class ExamStatus extends AuthController
{
    public function __construct(App $app, ExamStatusService $service)
    {
        parent::__construct($app);
        $this->services = $service;
    }

    /*
     * 保存考试违规记录
     */
    public function index()
    {
        $where = $this->request->postMore([
            ['website_id', $this->website],
            ['major_id', ''],
            ['class_id', ''],
            ['exam_id', ''],
            ['user_name', ''],
            ['idcard', ''],
            ['exam_status', ''],
            ['end_time', ''],
            ['create_time', date("Y-m-d H:i", time())],
        ]);
        return app()->make('json')->successful($this->services->createInformation($where));
    }
}